package com.smyh.protcol.host;


public class Protocol101Struts {

	/**
	 * 固定帧的开始
	 */
	public static byte FIX_FRAME_START = 0x10;
	/**
	 * 固定帧的结束
	 */
	public static byte FIX_FRAME_END = 0x16;
	
	/**
	 * 可变帧的开始
	 */
	public static byte VAR_FRAME_START = 0x68;
	/**
	 * 可变帧的结束
	 */
	public static byte VAR_FRAME_END = 0x16;
	
	/**
	 * 控制码：0x49初始化
	 * 类型列表
	 * 解释：低四位-0-复位远方链路、1-复位用户进程、3-发送、确认用户数据
	 * 4-发送无应答用户数据、8-访问请求、9-请求、响应链路状态、10-请求、响应1级用户数据
	 * 11-请求、响应2级用户数据
	 */ 
	//初始化-链路请求 
	public static byte INIT_HOST_01 = 0x49;
	//初始化应答
	public static byte INIT_ANSWER_01 = (byte) 0x8b;
	//初始化-链路复归
	public static byte INIT_HOST_02 = 0x40;
	//应答控制码
	public static byte INIT_ANSWER_02 = (byte) 0x80;
	
	//初始化-链路请求
	public static byte INIT_HOST_03 = (byte) 0xc9;
	//初始化应答
	public static byte INIT_ANSWER_03 = (byte) 0xb;
	//初始化-链路复归
	public static byte INIT_HOST_04 = (byte) 0xc0;
	//应答控制码
	public static byte INIT_ANSWER_04 = 0;
	
	//遥控控制：
	public static byte CONTROL_CONTROL_0A = 0xa;
	/**
	 * 控制码：0x49初始化
	 * 类型列表
	 */

	
	/**
	 * 数据类型：列表
	 * 
	 */
	//初始化结束码：
	public static byte INIT_OVER_DEVICE = (byte) 0xf3;
	
	public static byte ALL_CALL_TYPE_100 = 0x64;
	
	public static byte INIT_ANSWER_END = 0x10;
	
	//时间同步
	public static final byte SYNCH_TIME = 0x67;
	//同步确认设备确认	
	public static final byte SYNCH_TIME_CONFIRM_01 = INIT_ANSWER_04;
	//同步确认主机确认
	public static final byte SYNCH_TIME_CONFIRM_02 = INIT_ANSWER_02;
	
	/**
	 * 参数操作报文类型：130-参数读、写-确认帧
	 * 类型标识
	 */
	public static byte DATA_TYPE_PARAM_SELF_CMD = (byte) 0x82;
	//单点遥信：不带品质描述1字节
	public static byte DATA_TYPE_SINGLE_DIGTAL = 0x1;
	//双点遥信：不带品质描述1字节
	public static byte DATA_TYPE_DOUBLE_DIGTAL = 0x3;
	//归一化遥测值：带品质描述3字节
	public static byte DATA_TYPE_UNITY_Q_DIGTAL = 0x9;
	//标度化遥测值：带品质描述3字节
	public static byte DATA_TYPE_STAND_Q_DIGTAL = 0xb;
	//短浮点遥测值：带品质描述3字节
	public static byte DATA_TYPE_SHORT_FLOAT_Q_DIGTAL = 0xd;
	
	//归一化遥测值：带品质描述3字节
	public static byte DATA_TYPE_UNITY_DIGTAL = 0x15;

	//单点遥信：带品质描述，带7字节时标
	public static byte DATA_TYPE_SINGLE_Q_TIME_DIGTAL = 0x1e;
	//双点遥信：带品质描述，带7字节时标
	public static byte DATA_TYPE_DOUBLE_Q_TIME_DIGTAL = 0x1f;
	//归一化遥测值：带品质描述，带7字节时标
	public static byte DATA_TYPE_UNITY_Q_TIME_DIGTAL = 0x22;
	//标度化遥测值：带品质描述，带7字节时标
	public static byte DATA_TYPE_STAND_Q_TIME_DIGTAL = 0x23;
	//短浮点遥测值：带品质描述，带7字节时标
	public static byte DATA_TYPE_SHORT_FLOAT_Q_TIME_DIGTAL = 0x24;
	
	//单位遥控命令：每个报文只能包含一个遥控信息体
	public static byte DATA_TYPE_SINGLE_BIT_CONTROL_CMD = 0x2d;
	//双位遥控命令：每个报文只能包含一个遥控信息体
	public static byte DATA_TYPE_DOUBLE_BIT_CONTROL_CMD = 0x2e;
	//档位调节命令：每个报文只能包含一个档位调节信息体
	public static byte DATA_TYPE_LEVEL_SET_CMD = 0x2f;
	//归一化设定命令：每个报文只能包含一个归一化设定信息体
	public static byte DATA_TYPE_FOR_ONE_SET_CMD = 0x30;
	//标度化设定命令：每个报文只能包含一个标度化设定信息体
	public static byte DATA_TYPE_STAND_SET_CMD = 0x31;
	/**
	 * 参数操作报文类型：130-参数读、写-确认帧
	 * 类型标识
	 */
	
	
	
	/**
	 * 传输原因
	 */
	public static byte TRANS_CAUSE_WRITE_PARAM_CMD = 0xa;
	public static byte TRANS_CAUSE_WRITE_OK_PARAM_CMD = 0xb;
	public static byte TRANS_CAUSE_READ_PARAM_CMD = 0xc;
	public static byte TRANS_CAUSE_READ_OK_PARAM_CMD = 0xd;
	
	//=============正规记录：
	public static byte TRANS_CAUSE_SUDDEN_CMD = 0x3;
	public static byte TRANS_CAUSE_INIT_CMD = 0x4;
	
	public static byte TRANS_CAUSE_ASK_CMD = 0x5;
	public static byte TRANS_CAUSE_ACT_CMD = 0x6;
	public static byte TRANS_CAUSE_ACT_SURE_CMD = 0x7;
	public static byte TRANS_CAUSE_ACT_STOP_CMD = 0x8;
	public static byte TRANS_CAUSE_ACT_STOP_SURE_CMD = 0x9;
	public static byte TRANS_CAUSE_ACT_END_CMD = 0xa;
	public static byte TRANS_CAUSE_ANSWER_CALLS_CMD = 0x14;
	
	/**
	 * 固定参数信息体地址：
	 * 
	 */
	//101协议参数
	public static byte[] protocolParamAddr = {0x50,0};
	//主机硬件参数
	public static byte[] hardParamAddr = {0x51,0};
	//GPRS协议参数
	public static byte[] grpsParamAddr = {0x52,0};
	
	//101遥信点位值
	public static byte[] pointDigit = {0x53,0};
	//101遥测点位值
	public static byte[] pointMock = {0x54,0};
	//101遥调点位值
	public static byte[] pointSet = {0x56,0};
	//101遥控点位值
	public static byte[] pointControl = {0x55,0};

	//软件版本配置参数
	public static byte[] softVersionParamAdrr = {0x57,0};
	
}
